﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
using Xiaov.SmartWeb.Infrastructure.ExtMethod;

namespace Xiaov.SmartWeb.Application.PluginSrc.StatisticalSystem.ReportDesign.Json
{
    public partial class GetXmlNode : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string node = Request.Form["node"].ToRequestString();
            string xml = Request.Form["xml"].ToRequestString();
            string xmlpath = "~/PluginSrc/StatisticalSystem/Xml/" + xml;
            XmlDocument docXml = new XmlDocument();
            docXml.Load(System.Web.HttpContext.Current.Server.MapPath(xmlpath));
            XmlElement root = docXml.DocumentElement;
            XmlNodeList xn = root.GetElementsByTagName(node);
            Response.Clear();
            Response.Write(xn.ToString());
            Response.End();
        }
    }
}